home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
eulisp
/
mpfeel.lha
/
MPFeel
/
Plurals
/
debug.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-28
|
1KB
|
45 lines
/*
* Debugging
*
* Author: S.C.Merrall
*
* File: debug.h
*
* Contents: init_debug - initialise debugging
* DBG_CALL - register function entry
* DBG_ARGS - list argument values
* DBG_EXIT - register function exit
*
* Description: This supplies a concise trace system which can be
* witched on and off in files by including debug_off.h
* instead of debug.h
*
* Change History:
*
* Date Name Comment
* -------- ---- -------
* 06:02:91 SCM Created
*
*/
extern FILE *dbg;
extern char *dbg_g_fname;
#ifdef __STDC__
extern int init_debug( char * );
#else
extern int init_debug();
#endif
#define DBG_CALL(name) char *old_dbg_fname=dbg_g_fname;char *dbg_fname = name;\
dbg_g_fname = dbg_fname
#define DBG_ARGS(args) fprintf(dbg,"%s(",dbg_fname);args;fprintf(dbg,")\n")
#define DBG_EXIT(out) fprintf(dbg,"%s => ",dbg_fname);out;fprintf(dbg,"\n");\
dbg_g_fname=old_dbg_fname
#define DBG_NULL(ptr) if (ptr == NULL) fprintf(dbg,"WARNING: NULL pointer in %s called from %s\n",dbg_fname,old_dbg_fname);